

#include "app_net.h"

#include "../public/public_msg/public_msg.h"



static pthread_t  net_thread;


void* net_task(void *arg)
{
	struct timeval timer;	

	while(1)
	{
		usleep(1000);
		//************************************************************************

		timer.tv_sec  = 10;
		timer.tv_usec = 0;

		switch(select(0, NULL, NULL, NULL, &timer)) {
		case -1:  
			log_e("Error!\n");
			break;
		case 0: 
			break;
		default:break;
		}
		//************************************************************************

		net_sunning_servr_time();

		//************************************************************************


	}

}



int32_t app_net_create(void)
{
	int ret = -1;
	
	app_bdcast_create();

	app_server_create();


	ret=pthread_create(&net_thread, NULL, net_task, NULL);
	if(ret != 0){
		log_e("thread error=%s\n",strerror(ret));
	}


	return 0;
}



int32_t app_net_destory(void)
{


	return 0;
}


